package com.sc.test;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

import com.sc.test.animation.AnimationActivity;
import com.sc.test.arouter.ARouterActivity;
import com.sc.test.asynctask.AsyncTaskActivity;
import com.sc.test.camera.CameraActivity;
import com.sc.test.cardiogram.CardiogramActivity;
import com.sc.test.dagger2.Dagger2Activity;
import com.sc.test.databinding.DataBindingActivity;
import com.sc.test.deviceinfo.DeviceInfoActivity;
import com.sc.test.gps.GPSActivity;
import com.sc.test.handler.HandlerActivity;
import com.sc.test.inputlowertoupper.InputLowerToUpperActivity;
import com.sc.test.listcode.ListCodeActivity;
import com.sc.test.menutest.MenuTestActivity;
import com.sc.test.mytest.MytestActivity;
import com.sc.test.screeninfo.ScreenInfoActivity;
import com.sc.test.smalltest.SmallTestActivity;
import com.sc.test.tablayout.TabLayout2Activity;
import com.sc.test.utils.Util;
import com.sc.test.volley.VolleyActivity;
import com.sc.test.windowSoftInputMode.WindowSoftInputModeActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class MainActivity extends AppCompatActivity {

    @BindView(R.id.btn_okhttp)
    Button btnOkhttp;
    @BindView(R.id.btn_retrofit)
    Button btnRetrofit;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);

    }

    @OnClick({R.id.btn_okhttp, R.id.btn_volley, R.id.btn_retrofit, R.id.btn_rxjava, R.id.btn_retrofit_rxjava,
            R.id.btn_eventbus, R.id.btn_glide, R.id.btn_leakcanary, R.id.btn_greendao, R.id.btn_study_view,
            R.id.btn_recyclerview, R.id.btn_figerprint, R.id.btn_stick_recycler, R.id.btn_coordinator,
            R.id.btn_recyclerview2, R.id.btn_webview, R.id.btn_dialog, R.id.btn_drawerlayout, R.id.btn_toolbar,
            R.id.btn_zxing, R.id.btn_lottie, R.id.btn_tablayout, R.id.btn_listcode, R.id.btn_dagger2,
            R.id.btn_handler, R.id.btn_databinding, R.id.btn_windowinput, R.id.btn_smalltext, R.id.btn_animation,
            R.id.btn_cardiogram, R.id.btn_screen_info, R.id.btn_input, R.id.btn_gps, R.id.btn_take_pic,
            R.id.btn_device_info, R.id.btn_arouter, R.id.btn_mytest, R.id.btn_async_load, R.id.btn_menu})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.btn_okhttp:
                Intent intent = new Intent(this, OkhttpActivity.class);
                startActivity(intent);
                break;
            case R.id.btn_volley:
                Util.openNewActivity(this, VolleyActivity.class, "");
                break;
            case R.id.btn_retrofit:
                Util.openNewActivity(this, RetrofitActivity.class, "");
                break;
            case R.id.btn_rxjava:
                Util.openNewActivity(this, RxjavaActivity.class, "");
                break;
            case R.id.btn_retrofit_rxjava:
                Util.openNewActivity(this, RetrofitRxjavaActivity.class, "");
                break;
            case R.id.btn_eventbus:
                Util.openNewActivity(this, EventBusActivity.class, "");
                break;
            case R.id.btn_glide:
                Util.openNewActivity(this, GlideActivity.class, "");
                break;
            case R.id.btn_leakcanary:
                Util.openNewActivity(this, LeakCanaryActivity.class, "");
                break;
            case R.id.btn_greendao:
                Util.openNewActivity(this, GreenDaoActivity.class, "");
                break;
            case R.id.btn_study_view:
                Util.openNewActivity(this, StudyActivity.class, "");
                break;
            case R.id.btn_recyclerview:
                Util.openNewActivity(this, RecyclerActivity.class, "");
                break;
            case R.id.btn_figerprint:
                Util.openNewActivity(this, FingerPrintActivity.class, "");
                break;
            case R.id.btn_stick_recycler:
                Util.openNewActivity(this, StickyRecyclerActivity.class, "");
                break;
            case R.id.btn_coordinator:
                Util.openNewActivity(this, CoordinatorActivity.class, "");
                break;
            case R.id.btn_recyclerview2:
                Util.openNewActivity(this, RecyclerMainActivity.class, "");
                break;
            case R.id.btn_webview:
                Util.openNewActivity(this, WebViewActivity.class, "");
                break;
            case R.id.btn_dialog:
                Util.openNewActivity(this, DialogActivity.class, "");
                break;
            case R.id.btn_drawerlayout:
                Util.openNewActivity(this, DrawerLayoutActivity.class, "");
                break;
            case R.id.btn_toolbar:
                Util.openNewActivity(this, ToolBarActivity.class, "");
                break;
            case R.id.btn_zxing:
                Util.openNewActivity(this, ZxingActivity.class, "");
                break;
            case R.id.btn_lottie:
                Util.openNewActivity(this, LottieActivity.class, "");
                break;
            case R.id.btn_tablayout:
                Util.openNewActivity(this, TabLayout2Activity.class, "");
                break;
            case R.id.btn_listcode:
                Util.openNewActivity(this, ListCodeActivity.class, "");
                break;
            case R.id.btn_dagger2:
                Util.openNewActivity(this, Dagger2Activity.class, "");
            case R.id.btn_handler:
                Util.openNewActivity(this, HandlerActivity.class, "");
                break;
            case R.id.btn_databinding:
                Util.openNewActivity(this, DataBindingActivity.class, "");
                break;
            case R.id.btn_windowinput:
                Util.openNewActivity(this, WindowSoftInputModeActivity.class, "");
                break;
            case R.id.btn_smalltext:
                Util.openNewActivity(this, SmallTestActivity.class, "");
                break;
            case R.id.btn_animation:
                Util.openNewActivity(this, AnimationActivity.class, "");
                break;
            case R.id.btn_cardiogram:
                Util.openNewActivity(this, CardiogramActivity.class, "");
                break;
            case R.id.btn_screen_info:
                Util.openNewActivity(this, ScreenInfoActivity.class, "");
                break;
            case R.id.btn_input:
                Util.openNewActivity(this, InputLowerToUpperActivity.class, "");
                break;
            case R.id.btn_gps:
                Util.openNewActivity(this, GPSActivity.class, "");
                break;
            case R.id.btn_take_pic:
                Util.openNewActivity(this, CameraActivity.class, "");
                break;
            case R.id.btn_device_info:
                Util.openNewActivity(this, DeviceInfoActivity.class, "");
                break;
            case R.id.btn_arouter:
                Util.openNewActivity(this, ARouterActivity.class, "");
                break;
            case R.id.btn_mytest:
                Util.openNewActivity(this, MytestActivity.class, "");
                break;
            case R.id.btn_async_load:
                Util.openNewActivity(this, AsyncTaskActivity.class, "");
                break;
            case R.id.btn_menu:
                intent = new Intent(this, MenuTestActivity.class);
                startActivity(intent);
                break;
        }
    }
}
